<?php

/**
 * user_joomla
 */

// Check user and app status
OCP\JSON::checkAdminUser();
OCP\JSON::checkAppEnabled('user_joomla');
OCP\JSON::callCheck();

$prefix = $_POST['joomla_enabled'];
$connection = new \OCA\user_ldap\lib\Connection($prefix);
$connection->setConfiguration($_POST);
$connection->saveConfiguration();
OCP\JSON::success();

